import { http } from '@/utils/http.js'

//账号登录
export const login = (data) => {
	return http.post('/driver/login/account', data)
}

//获取验证码
export const getCode = (key) => {
	return http({
		url: '/driver/register/captcha?key='+key,
		method: 'GET',
		responseType: 'arraybuffer'
	})
}

//获取用户信息
export const getUserInfo = () => {
	return http.get('/driver/users')
}

//获取任务数据
export const getUserTask=({month,year})=>{
  return http.get('/driver/users/taskReport',{month,year})
}

//获取车辆信息
export const getTruckInfo=()=>{
	return http.get('/driver/users/truck')
}